package com.hw.dagl.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.hw.dagl.model.Dagl_T_Cjtj;
import com.hw.dagl.model.Sys_User;
import com.hw.dagl.model.Vehicle;
import com.hw.dagl.service.HomebtService;
import com.hw.dao.utils.ControllerUtil;
import com.hw.dao.utils.Page;

/**
 * 首页饼图分析
 * @author Administrator
 *
 */
@Controller
public class HomebtController extends BaseController{
	
	@Resource
	private HomebtService homebtserviceImpl;
	
	/**
	 * 采集数据统计
	 */
	@RequestMapping(method=RequestMethod.POST)
	public void cjcount(HttpServletRequest request,HttpServletResponse response,String tjld){
		Sys_User user = (Sys_User) request.getSession().getAttribute("user");//得到当前登录角色
		List<Dagl_T_Cjtj> list =homebtserviceImpl.cjcount(tjld,user.getGlbm());
		ControllerUtil.renderJson(response, list, "encoding:UTF-8", "no-cache:false");
	}
	
	/**
	 * 分页显示影像采集信息
	 */
	@RequestMapping(method=RequestMethod.POST)
	public void findYxcjPage(HttpServletRequest request,HttpServletResponse response,
								Page<Vehicle> pages,Vehicle info,String startTime,String endTime){
		Page<Vehicle> page = homebtserviceImpl.findYxcjxx(pages, info,startTime,endTime);
		ControllerUtil.renderJson(response, page, "encoding:UTF-8","no-cache:false");
	}
	
	/**
	 * 违法采集
	 * @param request
	 * @param response
	 *//*
	@RequestMapping(method=RequestMethod.POST)
	public void wfcjcounts(HttpServletRequest request,HttpServletResponse response,String tjld){
		List<Djgl_T_GcwfHSSR> list=homebtserviceImpl.wfcjcounts(tjld);
		ControllerUtil.renderJson(response, list, "encoding:UTF-8", "no-cache:false");
	}
	
	*//**
	 * 违法审核
	 * @param request
	 * @param response
	 *//*
	@RequestMapping(method=RequestMethod.POST)
	public void wfshcounts(HttpServletRequest request,HttpServletResponse response,String tjld){
			System.out.println(tjld+"1111111111111");
		List<Djgl_T_GcwfHSSR> list=homebtserviceImpl.wfshcounts(tjld);
		ControllerUtil.renderJson(response, list, "encoding:UTF-8", "no-cache:false");
	}
	
	
	
	*//**
	 * 违法入库
	 * @param request
	 * @param response
	 *//*
	@RequestMapping(method=RequestMethod.POST)
	public void wfrkcounts(HttpServletRequest request,HttpServletResponse response,String tjld){
		List<Djgl_T_GcwfHSSR> list=homebtserviceImpl.wfrkcounts(tjld);
		ControllerUtil.renderJson(response, list, "encoding:UTF-8", "no-cache:false");
	}
	*/
}
